﻿@model List<GameMall_Back.ViewModels.Goods.ViewModelVersions>
@{
    Layout = null;
}
@foreach (var item in Model)
{
    if (item.VersionId == 0)
    {
        @Html.Partial("VersionPartialView", item)
    }
    else
    {
        <li class="type">
            <div class="item">
                <div class="word">
                    <span class="star">*</span>
                    <span>版本名:</span>
                </div>
                <input value="@item.VersionName" readonly="readonly" />
                <span class="delete_version">
                    <button id="@item.VersionId" class="delete">x</button>
                </span>
            </div>
            <div class="item">
                <div class="word">
                    <span class="star">*</span>
                    <span>价格:</span>
                </div>
                <input value="@item.Price" readonly="readonly" />
            </div>
            <div class="item">
                <div class="word">
                    <span class="star">*</span>
                    <span>仓库:</span>
                </div>
                @Html.Action("SeeWarehouse", "Goods", new { item.WarehouseId })
            </div>
            <div class="item">
                <div class="word">
                    <span class="star">*</span>
                    <span>库存:</span>
                </div>
                <input value="@item.Stock" readonly="readonly" />
            </div>
            <div class="item">
                <div class="word">
                    <span>激活次数:</span>
                </div>
                <input value="@item.ActivationTimes" readonly="readonly" />
            </div>
            <div class="tit">该版本图片</div>
            <div class="tit">
                <div>
                    <img style="width:100px;height:100px;" src="@item.VersionImage" />
                </div>
            </div>
            <div class="item">
                <div class="word">
                    <span>是否上架:</span>
                </div>
                @if (item.Sell == 1)
                {
                    <input type="checkbox" checked="checked" class="shelf" disabled="disabled" />
                }
                else
                {
                    <input type="checkbox" class="shelf" disabled="disabled" />
                }
                <span class="edit_version">
                    <button id="@item.VersionId" data-toggle="modal" data-target="#myModal">修改版本信息</button>
                </span>
            </div>
        </li>
    }
}